<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ page import="com.msmall.base.util.ConstantDB" language="java"%>

<%@ page import="com.msmall.community.space.util.SpaceConstants" language="java"%>
<c:set var="UNVISIBLE" value="<%=ConstantDB.UNVISIBLE%>"></c:set>
<c:set var="VISIBLE" value="<%=ConstantDB.VISIBLE%>"></c:set>
<c:set var="SPACE_WIDGET_PART_PROFILE" value="<%=SpaceConstants.SPACE_WIDGET_PART_PROFILE%>"></c:set>

<div class="spaw220 fl">
	<div class="spaw220nav">
		<p class="fl sHBff">我的资料</p>
	</div>
	<div id="user_info_tab_nav" class="spalistfoot">
		<a id="user_info_tab_nav_1" class="spalistfoota" href="javascript:userinfoTab(1)">统计信息</a>
		<a id="user_info_tab_nav_2" href="javascript:userinfoTab(2)">基本资料</a>
		<a id="user_info_tab_nav_3" href="javascript:userinfoTab(3)">详细资料</a>
	</div>
</div>
<div id="user_info_tab_content" class="spaw730">
	
</div>
<script>
$(document).ready(function(){
	userinfoTab(1);
});
function userinfoTab(idNo){
	var url = "";
	if(idNo == 1){
		url = ctx + "/user/viewStatistics.do";
	}
	if(idNo == 2){
		url = ctx + "/user/viewInfo.do";
	}
	if(idNo == 3){
		url = ctx + "/user/viewProfile.do";
	}
	$.ajax({
		type : "POST",
		url : url,
		timeout:20000,
		success : function(data){
			$('#user_info_tab_content').html(data);
		},
		error: function(){
		}
	});
	
	$("#user_info_tab_nav a").each(function(index, ele){
		if($(this).attr('id') == ('user_info_tab_nav_'+idNo)){
			$(this).addClass('spalistfoota');
			$(this).removeClass('');
		}else{
			$(this).addClass('');
			$(this).removeClass('spalistfoota');
		}
	});
}
function updateUserInfo(){
	$.ajax({
		type : "POST",
		url : ctx+'/user/detail.do',
		timeout:20000,
		success : function(data){
			$('#user_info_tab_content').html(data);
		},
		error: function(){
		}
	});
}
function updateUserProfile(){
	$.ajax({
		type : "POST",
		url : ctx+'/user/profile.do',
		timeout:20000,
		success : function(data){
			$('#user_info_tab_content').html(data);
		},
		error: function(){
		}
	});
}
</script>